From 46fc2b33ed8e425dddf8af3ad9202eacb262c740 Mon Sep 17 00:00:00 2001 From: "cl349@firebug.cl.cam.ac.uk" Date: Tue, 24 May 2005 20:33:02 +0000 Subject: [PATCH] bitkeeper revision 1.1534 (42938f7eteOfeZAlPZyFJuucXgIZbA) Makefile: xc_io.[ch] is no longer needed. xc_vmx_build.c: offsetof() needs #include , which was getting pulled in implicitly from xc_io.h. .del-xc_io.h~f59d36f1439a3f8d: Delete: tools/libxc/xc_io.h .del-xc_io.c~2d9e23eb479fe52: Delete: tools/libxc/xc_io.c Signed-off-by: Christian Limpach --- .rootkeys | 2 -- tools/libxc/Makefile | 1 - tools/libxc/xc_io.c | 43 ----------------------- tools/libxc/xc_io.h | 71 -------------------------------------- tools/libxc/xc_vmx_build.c | 1 + 5 files changed, 1 insertion(+), 117 deletions(-) delete mode 100644 tools/libxc/xc_io.c delete mode 100644 tools/libxc/xc_io.h diff --git a/.rootkeys b/.rootkeys index 720c76406e..3526ae3342 100644 --- a/.rootkeys +++ b/.rootkeys @@ -686,8 +686,6 @@ 40278d99BLsfUv3qxv0I8C1sClZ0ow tools/libxc/xc_elf.h 403e0977Bjsm_e82pwvl9VvaJxh8Gg tools/libxc/xc_evtchn.c 4227c129ZKjJPNYooHVzBCyinf7Y6Q tools/libxc/xc_gnttab.c -40e03333Eegw8czSWvHsbKxrRZJjRA tools/libxc/xc_io.c -40e03333vrWGbLAhyJjXlqCHaJt7eA tools/libxc/xc_io.h 3fbba6dbNCU7U6nsMYiXzKkp3ztaJg tools/libxc/xc_linux_build.c 3fbba6dbl267zZOAVHYLOdLCdhcZMw tools/libxc/xc_linux_restore.c 3fbba6db7li3FJiABYtCmuGxOJxEGw tools/libxc/xc_linux_save.c diff --git a/tools/libxc/Makefile b/tools/libxc/Makefile index 041bf44423..e5db1adcf6 100644 --- a/tools/libxc/Makefile +++ b/tools/libxc/Makefile @@ -22,7 +22,6 @@ SRCS += xc_core.c SRCS += xc_domain.c SRCS += xc_evtchn.c SRCS += xc_gnttab.c -SRCS += xc_io.c SRCS += xc_linux_build.c SRCS += xc_plan9_build.c SRCS += xc_linux_restore.c diff --git a/tools/libxc/xc_io.c b/tools/libxc/xc_io.c deleted file mode 100644 index 5589483f10..0000000000 --- a/tools/libxc/xc_io.c +++ /dev/null @@ -1,43 +0,0 @@ -#include "xc_io.h" -#include - -void xcio_timestamp(XcIOContext *ctxt, const char *msg){ - struct timeval tv; - - gettimeofday(&tv, NULL); - if (msg[0] != '\b' && msg[0] != '\r') - fprintf(stdout, "[%08ld.%06ld] ", tv.tv_sec, tv.tv_usec); -} - -void xcio_error(XcIOContext *ctxt, const char *msg, ...){ - va_list args; - - va_start(args, msg); - vfprintf(stdout, msg, args); fprintf(stdout, "\n"); fflush(stdout); - IOStream_vprint(ctxt->info, msg, args); - IOStream_print(ctxt->info, "\n"); - va_end(args); -} - -void xcio_info(XcIOContext *ctxt, const char *msg, ...){ - va_list args; - - if(0 && !(ctxt->flags & XCFLAGS_VERBOSE)) return; - va_start(args, msg); - xcio_timestamp(ctxt, msg); - vfprintf(stdout, msg, args); fprintf(stdout, "\n"); - IOStream_vprint(ctxt->info, msg, args); - fflush(stdout); - va_end(args); -} - -void xcio_debug(XcIOContext *ctxt, const char *msg, ...){ - va_list args; - - if(0 && !(ctxt->flags & XCFLAGS_DEBUG)) return; - va_start(args, msg); - xcio_timestamp(ctxt, msg); - vfprintf(stdout, msg, args); fprintf(stdout, "\n"); - IOStream_vprint(ctxt->info, msg, args); - va_end(args); -} diff --git a/tools/libxc/xc_io.h b/tools/libxc/xc_io.h deleted file mode 100644 index 4325473518..0000000000 --- a/tools/libxc/xc_io.h +++ /dev/null @@ -1,71 +0,0 @@ -#ifndef __XC_XC_IO_H__ -#define __XC_XC_IO_H__ - -#include -#include "xc_private.h" -#include "iostream.h" - -typedef struct XcIOContext { - u32 domain; - unsigned flags; - int resource; - IOStream *io; - IOStream *info; - IOStream *err; - char *vmconfig; - int vmconfig_n; - int (*suspend)(void *data, u32 domain); - int (*configure)(void *data, u32 domain, char *vmconfig, int vmconfig_n); - void *data; -} XcIOContext; - -static inline int xcio_suspend_domain(XcIOContext *ctxt){ - int err = 0; - - if(ctxt->suspend){ - err = ctxt->suspend(ctxt->data, ctxt->domain); - } else { - err = -EINVAL; - } - return err; -} - -static inline int xcio_configure_domain(XcIOContext *ctxt){ - int err = 0; - - if(ctxt->configure){ - err = ctxt->configure(ctxt->data, ctxt->domain, ctxt->vmconfig, ctxt->vmconfig_n); - } else { - err = -EINVAL; - } - return err; -} - -static inline int xcio_read(XcIOContext *ctxt, void *buf, int n){ - int rc; - - rc = IOStream_read(ctxt->io, buf, n); - return (rc == n ? 0 : -1); -} - -static inline int xcio_write(XcIOContext *ctxt, void *buf, int n){ - int rc; - - rc = IOStream_write(ctxt->io, buf, n); - return (rc == n ? 0 : -1); -} - -static inline int xcio_flush(XcIOContext *ctxt){ - return IOStream_flush(ctxt->io); -} - -extern void xcio_error(XcIOContext *ctxt, const char *msg, ...); -extern void xcio_info(XcIOContext *ctxt, const char *msg, ...); - -#define xcio_perror(_ctxt, _msg...) \ -xcio_error(_ctxt, "(errno %d %s)" _msg, errno, strerror(errno), ## _msg) - -#endif /* ! __XC_XC_IO_H__ */ - - - diff --git a/tools/libxc/xc_vmx_build.c b/tools/libxc/xc_vmx_build.c index 31319db21a..360f375744 100644 --- a/tools/libxc/xc_vmx_build.c +++ b/tools/libxc/xc_vmx_build.c @@ -2,6 +2,7 @@ * xc_vmx_build.c */ +#include #include "xc_private.h" #define ELFSIZE 32 #include "xc_elf.h" -- 2.30.2